.container {
  width: 100%;
  min-height: 20vh;
  background: #F0F2F5;
  padding: 16px;
}

.header {
  margin-bottom: 16px;

  .backButton {
    color: #595959;
    padding: 0;

    &:hover {
      color: #1890FF;
    }
  } 
}


.content {
  background: #fff;
  border-radius: 2px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filterBar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 19px;
  

  .timeUnitGroup {
    :global {
      .ant-radio-button-wrapper {
        min-width: 60px;
        text-align: center;
      }
    }
  }

  .timeButton {
    display: flex;
    align-items: center;
    gap: 4px;

    .timeIcon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      background: #1890FF;
      color: #fff;
      border-radius: 50%;
      font-size: 12px;
    }
  }

  .rangePicker {
    min-width: 240px;
  }

  .queryButton {
    margin-right: 8px;
  }
}

.chartContainer {
  background: #fff;
  border-radius: 2px;
}

.chartHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.chartTitle {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  color: #262626;

  .dot {
    width: 6px;
    height: 6px;
    background: #1890FF;
    border-radius: 50%;
    margin-right: 8px;
  }
}

.viewButtons {
  display: flex;
  gap: 8px;
}

.chart {
  height: 400px;
  width: 100%;

  :global {
    .g2-tooltip {
      background: rgba(0, 0, 0, 0.65) !important;
      color: #fff !important;
      border: none !important;
      box-shadow: none !important;
      padding: 8px 12px !important;
      border-radius: 2px !important;
    }

    .g2-tooltip-title {
      color: rgba(255, 255, 255, 0.85) !important;
      margin-bottom: 8px !important;
    }

    .g2-tooltip-list {
      margin: 0 !important;
      padding: 0 !important;
      list-style: none !important;
    }

    .g2-tooltip-list-item {
      margin-bottom: 4px !important;
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      gap: 16px !important;
      color: rgba(255, 255, 255, 0.85) !important;

      &:last-child {
        margin-bottom: 0 !important;
      }
    }

    .g2-tooltip-marker {
      width: 6px !important;
      height: 6px !important;
      border-radius: 50% !important;
      margin-right: 6px !important;
    }

    // 优化图例样式
    .g2-legend {
      margin: 0 !important;
      padding: 0 !important;
      
      .g2-legend-list {
        display: flex !important;
        align-items: center !important;
        gap: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
      }

      .g2-legend-list-item {
        display: flex !important;
        align-items: center !important;
        cursor: pointer !important;
        margin: 0 !important;
        padding: 0 !important;

        .g2-legend-marker {
          margin-right: 8px !important;
        }
      }
    }

    // 优化坐标轴样式
    .g2-axis {
      line {
        stroke: #E5E5E5 !important;
      }

      text {
        fill: #595959 !important;
        font-size: 12px !important;
      }

      .g2-axis-grid {
        line {
          stroke: #E5E5E5 !important;
          stroke-dasharray: 4 4 !important;
          opacity: 0.5 !important;
        }
      }
    }
  }
}
